<?php
session_start();
if(!isset($_SESSION['usuario'])){
    header('location:../html/login.html');
 }

     echo '
            <center>
                <title>Tablero Especialistas</title>
                <table>
                    <tr>
                        <td>';
                            include_once 'menu.php';
                            echo"
                        </td>
                    </tr>
                </table>
                </br>
                <table>
                    <tr>
                        <td align=center>";
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="jquery-1.9.1.min.js"></script>
        <!-- LIBRERIAS JQUERY Y CSS PARA LA CREACION DE LAS ALERTAS -->
        <script type="text/javascript" src="../../Ginecobstetricia/vista/js/alertify.js"></script>
	<link rel="stylesheet" href="../../Ginecobstetricia/vista/css/alertify.core.css" />
	<link rel="stylesheet" href="../../Ginecobstetricia/vista/css/alertify.default.css" />
         <!-- LIBRERIAS Y CSS PARA LA CREACION DE LA HORA (DATEPICKER) -->
        
        <script type="text/javascript" src="../../Laboratorio/vista/datepicker/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="../../Laboratorio/vista/datepicker/jquery-ui.min.js"></script>
        <script type="text/javascript" src="../../Laboratorio/vista/datepicker/jquery-ui-timepicker-addon.js"></script>
        <script type="text/javascript" src="../../Laboratorio/vista/datepicker/jquery-ui-sliderAccess.js"></script>
        <link rel="stylesheet" media="all" type="text/css" href="../../Laboratorio/vista/datepicker/jquery-ui.css" />
	<link rel="stylesheet" media="all" type="text/css" href="../../Laboratorio/vista/datepicker/jquery-ui-timepicker-addon.css" />
        
        <style>
             .black_overlay{
                display: none;
                position: absolute;
                top: 0%;
                left: 0%;
                width: 100%;
                height: 100%;
                background-color: black;
                z-index:1001;
                -moz-opacity: 0.8;
                opacity:.80;
                filter: alpha(opacity=80);
            }
            
            .white_content {
                display: none;
                position: absolute;
                top:1%;
                left: 1%;
                width: 96%;
                height: 94%;
                padding: 1%;
                z-index:1002;
               /* overflow: auto;*/
                background-color: white;
                border-radius: 10px;
            }
            
            /* para las filas impares */
            table tr:nth-child(odd) th {
                background-color: #DAEAFF;
                font-weight: normal;
            }
            
            /* para las filas paras */
            table tr:nth-child(even) th {
                background-color: #FFFFFF;
                font-weight: normal;
            }
            
            .white_content2 {
                display: none;
                position: absolute;
                top:1%;
                left: 3.5%;
                width: 90%;
                height: 80%;
                margin-top: 3%;
                padding: 1%;
                z-index:1002;
                background-color: white;
                border-radius: 10px;

            }
        </style>
        <script>
            function cargarEspecialidad(){
                $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../Laboratorio/controlador/php/sql/especiali.php",
                    success:datosEspecialidad
                });
            }
            
            function datosEspecialidad(datos){
                rpt = $.parseJSON(datos);
                
                for(r in rpt){
                    
                    $("#especialidad").append('<option value="'+ rpt[r].OID +'">'+ rpt[r].GEEDESCRI +'</option>');
                    
                }
            }
            
            function especialida(){
                document.getElementById('tabla').style.display='block';
                document.getElementById('fade').style.display='block';
                var especi = $("#especialidad").val();
                var tc = 3;
                $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/tableroEspecialistas.php",
                    data:{tc:tc,especi:especi},
                    success: datosEspecialida
                });
            }
            
            function datosEspecialida(datos){
                $("#nombreEspeci").text("");
                rpt = $.parseJSON(datos);
                for(r in rpt){
                    document.getElementById("nombreEspeci").innerHTML = rpt[r].GEEDESCRI;
                }
                tableroEspecialista();
            }
            function tableroEspecialista(){
                $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/areaser.php",
                    success: servicios
                });
                urgencias();
            }
            
            function servicios(datos){
                $("#contenido").text("");
                rpt = $.parseJSON(datos);
                    datos = $("#contenido");
                    var resp = "";
                    resp += "<table width='100%' style='font-size:80%'>";
                     var con = 1;
                     for(dat in rpt){                 
                     resp += "<tr>\
                                    <td style='background:linear-gradient(#e8eaeb,#B5B5B5);height:5%; border-radius:10px 10px 0 0; '>\
                                         <b>"+rpt[dat].HSUNOMBRE+"</b>\
                                    </td>\
                                </tr>\
                                <tr>\
                                    <th style='width:80%;'>\
                                         <div id='pacientesEspeci"+dat+"'></div>\
                                    </th>\
                                </tr>\ ";
                   pacientesEspeci(dat,rpt[dat].HSUCODIGO); 
                   }  
                   con++;
                   resp += "</table>";
                   datos.append(resp);
                   
            }
            
            function pacientesEspeci(posi,codser){
                var especi = $("#especialidad").val();
                var tc = 1;
                $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/tableroEspecialistas.php",
                    data:{tc:tc,codser:codser,especi:especi},
                    success:function datosPacientesE(datos){
                                $("#pacientesEspeci"+posi).text("");
                                var dato = datos;
                                if(dato == "null"){
                                    document.getElementById("pacientesEspeci"+posi).innerHTML = '<span style="color:red"><b>NO HAY PACIENTES ASIGNADOS</b>';
                                }else{
                                rpt = $.parseJSON(datos);
                                    datos = $("#pacientesEspeci"+posi);
                                    var resp = "";
                                    resp += "<table width='100%' style='font-size:90%'>\
                                                <tr>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                        CAMA\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                        PACIENTE\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       EDAD\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       IDENTIFICACION\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       INGRESO\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       EPS\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       OTRAS ESPECIALIDADES TRATANTES\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       ENF.ACTUAL\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       TRATAMIENTO\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       DIAGNOSTICO\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       OBSERVACIONES\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       ESTADO\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       DOLOR DT\
                                                     </td>\
                                                     <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                       PENDIENTES\
                                                     </td>\
                                                 </tr>";
                                     var con = 1;
                                     for(dat in rpt){
                                        var estado = rpt[dat].estado;
                                        if(estado == 1){
                                         var esta = 'Observado';   
                                        }else if(estado == 2){
                                         esta = 'Hospitalizado';
                                        }else if(estado == 3){
                                         esta = 'Administracion de Medicamentos';   
                                        }else if(estado == 4){
                                         esta = 'Salida'; 
                                        }else if(estado == 5){
                                          esta ='Quirofano';   
                                        }else{
                                         esta = '';   
                                        }
                                        var dolordt = rpt[dat].dolordt;
                                        if(dolordt == 1){
                                         var dolor ='<img src="../imagen/aceptar.png" width="15" height="15" alt="aceptar" title="Dolor De Dificil Tratamiento"/>';   
                                        }else{
                                            dolor = '';
                                        }
                                     resp += "<tr>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].HCACODIGO+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].NOMPAC+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].EDAD+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].paciente+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].AINCONSEC+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].GDENOMBRE+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                        <div id='otrasEspe"+posi+'0'+dat+"'></div>\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:justify;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].enfactual+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:justify;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].tratamiento+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:justify;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].diagnostico+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:justify;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+rpt[dat].observaciones+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+esta+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         "+dolor+"\
                                                    </th>\
                                                    <th style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                         <input type='button' value='...' onclick='Pendientes("+rpt[dat].paciente+","+ rpt[dat].AINCONSEC +");'/>\
                                                    </th>\
                                                </tr>";
                                     con++;
                                     otrasEspeci(rpt[dat].paciente,rpt[dat].oid,dat,especi,posi);
                                   } 
                                    
                                   resp += "</table>";
                                   datos.append(resp);
                                }
                            }
                });
                
            }
      
            function otrasEspeci(pac,oid,posi1,especi,posi2){
                var posi = posi2+'0'+posi1;
                var tc = 2;
                 $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/tableroEspecialistas.php",
                    data:{tc:tc,pac:pac,oid:oid,especi:especi},
                    success: function datosOespe(datos){
                                    $("#otrasEspe"+posi).text("");
                                    rpt = $.parseJSON(datos);
                                    datos = $("#otrasEspe"+posi);
                                    var resp = "";
                                    resp += "<table>";
                                    var con = 1;
                                     for(dat in rpt){
                                     resp += "<tr>\
                                                    <td style='font-size:60%'>\
                                                       -"+rpt[dat].GEEDESCRI+"<br>\
                                                    </td>\
                                                 </tr>";
                                   con++;
                                   
                                   } 
                                   resp += "</table>";
                                   datos.append(resp);
                    }
                    
                });
            }
            
            function urgencias(){
                var tc = 1;
                var especi = $("#especialidad").val();
                var codser = 'URG';
                 $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/tableroEspecialistas.php",
                    data:{tc:tc,codser:codser,especi:especi},
                    success: function datosUrgencias(datos){
                                    $("#urgencias").text("");
                                    var dato = datos;
                                    if(dato == "null"){
                                        document.getElementById("urgencias").innerHTML = '<span style="color:red;font-size:80%"><b>NO HAY PACIENTES ASIGNADOS</b>';
                                    }else{
                                        rpt = $.parseJSON(datos);
                                        datos = $("#urgencias");
                                        var resp = "";
                                        resp += "<table width='100%' style='font-size:75%'>\
                                                    <tr>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            CAMA\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            PACIENTE\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            DOCUMENTO\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            INGRESO\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            EDAD\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            ASEGURADOR\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            AUX ASIGNADA\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            MÉDICO\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            OTRAS ESPECIALIDADES TRATANTES\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            DIAGNOSTICO\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            OBSERVACIONES\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            ESTADO\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            DOLOR DT\
                                                        </td>\
                                                        <td style='padding:1px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                            PENDIENTES\
                                                        </td>\
                                                    </tr>";
                                        var con = 1;
                                         for(dat in rpt){
                                         var dolordt = rpt[dat].dolordt;
                                         if(dolordt == 1){
                                            var dolor = '<img src="../imagen/aceptar.png" width="15" height="15" alt="aceptar" title="Dolor De Dificil Tratamiento"/>';
                                         }else{
                                             dolor = '';
                                         }
                                         var estado = rpt[dat].estado;
                                         if(estado == 1){
                                          var esta = 'Observado';   
                                         }else if(estado == 2){
                                          esta = 'Hospitalizado';
                                         }else if(estado == 3){
                                          esta = 'Administracion de Medicamentos';   
                                         }else if(estado == 4){
                                          esta = 'Salida'; 
                                         }else if(estado == 5){
                                          esta ='Quirofano';   
                                         }else{
                                          esta = '';   
                                         }
                                         resp += "<tr>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].HCACODIGO+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].NOMPAC+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].paciente+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].AINCONSEC+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].EDAD+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].GDENOMBRE+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].auxiliar+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].medico2+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           <div id='otraEs"+dat+"'></div>\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:justify;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].diagnostico+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:justify;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+rpt[dat].observaciones+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:left;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+esta+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                           "+dolor+"\
                                                        </td>\
                                                        <td style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                             <input type='button' value='...' onclick='Pendientes("+rpt[dat].paciente+","+ rpt[dat].AINCONSEC +");'/>\
                                                        </td>\
                                                     </tr>";
                                       con++;
                                       otrasEspecialidad(rpt[dat].paciente,rpt[dat].oid,dat,especi);
                                       } 
                                       resp += "</table>";
                                       datos.append(resp);
                            }
                        }
                        });
                    }
            
            
                function Pendientes(pac,ingreso){
                
                var tc = 8;
                 $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/consultas/crudTablero.php",
                    data:{tc:tc,pac:pac,ingreso:ingreso},
                    success: function abrirP(datos){
                                document.getElementById('tablaP').style.display='block';
                                document.getElementById('fade2').style.display='block';
                                $("#pacp").text("");
                                               $("#laboratorio").text("");
                                               rpt = $.parseJSON(datos);
                                               datos = $("#laboratorio");
                                               var resp = "";
                                               var cont = 1;
                                               var pac = "";
                                               var toma = "";
                                               resp += "<table style='width:100%;font-size:100%'>\
                                                            <tr>\
                                                                <td colspan='2' style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Fecha Solicitud\
                                                                </td>\
                                                                <td style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Examen\
                                                                </td>\
                                                                <td style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Tomado\
                                                                </td>\
                                                                <td style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                                                    Interpretado\
                                                                </td>\
                                                            </tr>";
                                               for(r in rpt){
                                                   document.getElementById("pacp").innerHTML = rpt[r].NOM_PACIENTE; 
                                                   toma = rpt[r].segestado;

                                                   if(toma != 0){
                                                       var toma2 = '<img src="../imagen/aceptar.png" width="10" height="10" alt="aceptar" title="Tomado"/>';
                                                   }else{
                                                       toma2 = "";
                                                   }
                                                   var inter  = rpt[r].seginterpretado;
                                                   if(inter == 1){
                                                       var interpretado = '<img src="../imagen/aceptar.png" width="10" height="10" alt="aceptar" title="Interpretado"/>';
                                                   }
                                                   else{
                                                       interpretado = '';
                                                   }
                                                   resp += "<tr>\
                                                               <td style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                   "+ cont +"\
                                                               </td>\
                                                               <td style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                   "+ rpt[r].FECHA_SOLICITUD +"\
                                                               </td>\
                                                               <td  style=' padding:0.5px 5px 0.5px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                   "+ rpt[r].MUESTRA +"\
                                                               </td>\
                                                               <td  align='center' style='padding:0.5px 5px 0.5px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                   "+ toma2 +"\
                                                               </td>\
                                                               <td  align='center' style='padding:0.5px 5px 0.5px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                                                   "+interpretado+"\
                                                               </td>\
                                                            </tr>";
                                                   pac = rpt[r].DOCUMENTO;
                                                   cont++;
                                               }

                                               resp += "</table>";
                                               datos.append(resp);
                                             abrirPendientesI(pac,ingreso);
                                   }
                               });
                           }
                           
            /*Funcion para cargar el listado de pendientes de imagenes dx*/
            function abrirPendientesI(pac,ingreso){
                var tc = 9;
                
                $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/consultas/crudTablero.php",
                    data:{tc:tc,pac:pac,ingreso:ingreso},
                    success: abrirPi
                });
            }
            
            function abrirPi(datos){
                $("#imagenes").text("");
                
                rpt = $.parseJSON(datos);
                
                datos = $("#imagenes");
                
                var resp = "";
                var cont = 1;
                var toma = "";
                
                resp += "<table style='width:100%;font-size:60%'>\
                            <tr>\
                                <td colspan='2' style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                    Fecha Solicitud\
                                </td>\
                                <td style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                    Examen\
                                </td>\
                                <td style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                    Tomado\
                                </td>\
                                <td style='font-size: 100%; padding:10px 10px 10px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 250% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe)); background:#e8eaeb;'>\
                                    Interpretado\
                                </td>\
                            </tr>";
                
                for(r in rpt){
                    
                    toma = rpt[r].tmestado;
                
                    if(toma != 0){
                        var toma2 = '<img src="../imagen/aceptar.png" width="10" height="10" alt="aceptar" title="Tomado"/>';
                    }else{
                        toma2 = "";
                    }
                    var interp = rpt[r].inestado;
                    if (interp == 1){
                        var interpretadoI = '<img src="../imagen/aceptar.png" width="10" height="10" alt="aceptar" title="Interpretado"/>';
                    }else {
                        interpretadoI='';
                    }
                    resp += "<tr>\
                                <td style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                    "+ cont +"\
                                </td>\
                                <td style=' padding:0.5px 5px 0.5px; text-align:center;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                    "+ rpt[r].FECHA_SOLICITUD +"\
                                </td>\
                                <td  style=' padding:0.5px 5px 0.5px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                    "+ rpt[r].MUESTRA +"\
                                </td>\
                                <td  style='text-align:center; padding:0.5px 5px 0.5px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                    "+ toma2 +"\
                                </td>\
                                <td  style='text-align:center; padding:0.5px 5px 0.5px;border-top:1px solid #e0e0e0; border-right:1px solid #e0e0e0;background: -moz-linear-gradient(100% 25% 90deg, #fefefe, #f9f9f9);background: -webkit-gradient(linear, 0% 0%, 0% 25%, from(#f9f9f9), to(#fefefe));'>\
                                    "+interpretadoI+"\
                                </td>\
                             </tr>";
                    cont++;
                }
                
                resp += "</table>";
                
                datos.append(resp);
            }
            
            function otrasEspecialidad(pac,oid,posi,especi){
                var tc = 2;
                 $.ajax({
                    type: "POST",
                    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                    url: "../../EntregaT/controlador/tableroEspecialistas.php",
                    data:{tc:tc,pac:pac,oid:oid,especi:especi},
                    success: function datosOespe(datos){
                                    //$("#otrasEspe"+posi).text("");
                                    rpt = $.parseJSON(datos);
                                    datos = $("#otraEs"+posi);
                                    var resp = "";
                                    resp += "<table>";
                                    var con = 1;
                                     for(dat in rpt){
                                     resp += "<tr>\
                                                    <td style='font-size:60%'>\
                                                       -"+rpt[dat].GEEDESCRI+"<br>\
                                                    </td>\
                                                 </tr>";
                                   con++;
                                   
                                   } 
                                   resp += "</table>";
                                   datos.append(resp);
                    }
                    
                });
            }
            
            function cerrar(){
                document.getElementById('tabla').style.display='none';
                document.getElementById('fade').style.display='none';
            }
            
            function cerrar2(){
                document.getElementById('tablaP').style.display='none';
                document.getElementById('fade2').style.display='none';
            }
            function recargar(){
                tableroEspecialista();
            }
        </script>
    </head>
    <body onload="cargarEspecialidad();">
        <table>
            <tr>
                <td align="center">
                    <strong>SELECCIONE ESPECIALIDAD</strong><br><br>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <select name=""  id="especialidad" style="width:350px" onchange="especialida();">
                        <option>Especialidades</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    <div id="tabla" class="white_content">
                        <div style="background:linear-gradient(#B5B5B5,#e8eaeb);height:5%; border-radius: 10px 10px 0 0;">
                            <table  width="100%">
                                <tr>
                                    <td align="center" width="98%">
                                        <strong><div id="nombreEspeci"></div></strong>
                                    </td>
                                    <td>
                                        <img src="../imagen/recargar.png" width="20" height="20" alt="recargar" onclick="recargar();"/>

                                    </td>
                                    <td>
                                         <button type="button" style="width: 100%;" onclick = "cerrar();">X</button>
                                    </td>
                                </tr>
                            </table>
                        </div>
                         <div style='overflow-y: scroll;height:90%;'>
                            <div id="contenido" style="width: 100%"></div>
                            <div style="font-size: 80%;background:linear-gradient(#e8eaeb,#B5B5B5);height:3%; border-radius:10px 10px 0 0;"><b>URGENCIAS</b></div>
                            <div style="width: 100%" align="center" id="urgencias"></div>
                        </div>
                        <div align="center" style="font-size:80%;background:linear-gradient(#e8eaeb,#B5B5B5);height:5%; border-radius: 0 0 10px 10px;">
                        
                        </div>
                        <div id="tablaP" class="white_content2">
                        <div align="center" style="background:linear-gradient(#B5B5B5,#e8eaeb);height:5%;width:100%; border-radius: 10px 10px 0 0;">
                            <table style="width:100%;" >
                                <tr>
                                    <td align="center" >
                                        <label style="font-size: 90%"><strong>EXAMENES LABORATORIO E IMAGENES</strong></label>
                                    </td>
                                    <td width="5%" align="center">
                                        <button type="button" style="width: 40%;" onclick = "cerrar2();">X</button>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div style='height:90%;'>
                            <table style="width: 100%;height: 100%">
                                <tr>
                                    <td style="height: 30px;background-color:whitesmoke;font-size:55%" align="center">
                                        <strong>LABORATORIO</strong>
                                    </td>
                                    <td style="height: 30px;background-color:whitesmoke;font-size:55%" align="center">
                                        <strong>IMAGENES</strong>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 50%;font-size:55%">
                                        <div style="overflow-y: scroll; height: 435px;" id="laboratorio">
                                        </div>
                                    </td>
                                    <td>
                                        <div style="overflow-y: scroll; height: 435px" id="imagenes">
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div style="padding: 1px;background:linear-gradient(#e8eaeb, #B5B5B5);height:5%;width:100%; border-radius: 0 0 10px 10px;">
                            <table style="font-size: 60%;"><tr><td><strong>PACIENTE: </strong></td><td><strong><div  id="pacp"></div></strong></td></tr></table>
                       </div>
                    </div>
                    <div id="fade2" class="black_overlay"></div>
                    </div>
                    <div id="fade" class="black_overlay"></div>
                </td>
            </tr>
        </table>
    </body>
</html>